<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>把 5 赋值给 x，然后显示 (x >= 8) 的值</title>
</head>

<body>
    <h1>JavaScript 比较</h1>
    <p>把 5 赋值给 x，然后显示比较 (x >= 8) 的值：</p>
    <p id="demo"></p>
    <script>
        var x = 5;
        document.getElementById("demo").innerHTML = (x >= 8);
    </script>
</body>

</html>